package MyReview;

import java.util.Scanner;

public class Day1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个数字: ");
        if (sc.hasNextDouble()) {
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            System.out.println("ok");
            String num = sc.next();
            System.out.println("你输入的数字是: " + num.charAt(0));
        } else {
            System.out.println("输入的不是一个有效的数字！");
        }
        sc.close();
    }
}

